 package com.bmps.springcloud.insuredmicroservice.model.accept.resquest;

 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;

 import javax.validation.Valid;
 import javax.validation.constraints.NotNull;
 import java.io.Serializable;

 /**
  *  @author lyw
  *  @date 2019/07/24
  */
 public class RequestModel implements Serializable {
     @Valid
     @NotNull(message = "policyInfo节点不能为空!")
	 private PolicyInfoModel policyInfo;

     @Valid
     @NotNull(message = "custInfo节点不能为空!")
	 private CustInfoModel custInfo;

     @Valid
     @NotNull(message = "productInfo节点不能为空!")
	 private ProductInfoModel productInfo;

     @Valid
	 private InformModel inform;

     @Valid
	 private DocListModel docList;

	 private MidResultModel midResult;

     public PolicyInfoModel getPolicyInfo() {
         return policyInfo;
     }

     public void setPolicyInfo(PolicyInfoModel policyInfo) {
         this.policyInfo = policyInfo;
     }

     public CustInfoModel getCustInfo() {
         return custInfo;
     }

     public void setCustInfo(CustInfoModel custInfo) {
         this.custInfo = custInfo;
     }

     public ProductInfoModel getProductInfo() {
         return productInfo;
     }

     public void setProductInfo(ProductInfoModel productInfo) {
         this.productInfo = productInfo;
     }

     public InformModel getInform() {
         return inform;
     }

     public void setInform(InformModel inform) {
         this.inform = inform;
     }

     public DocListModel getDocList() {
         return docList;
     }

     public void setDocList(DocListModel docList) {
         this.docList = docList;
     }

     public MidResultModel getMidResult() {
         return midResult;
     }

     public void setMidResult(MidResultModel midResult) {
         this.midResult = midResult;
     }

     @Override
     public boolean equals(Object o) {
         if (this == o) {
             return true;
         }

         if (o == null || getClass() != o.getClass()){
             return false;
         }

         RequestModel that = (RequestModel) o;

         return new EqualsBuilder()
                 .append(policyInfo, that.policyInfo)
                 .append(custInfo, that.custInfo)
                 .append(productInfo, that.productInfo)
                 .append(inform, that.inform)
                 .append(docList, that.docList)
                 .append(midResult, that.midResult)
                 .isEquals();
     }

     @Override
     public int hashCode() {
         return new HashCodeBuilder(17, 37)
                 .append(policyInfo)
                 .append(custInfo)
                 .append(productInfo)
                 .append(inform)
                 .append(docList)
                 .append(midResult)
                 .toHashCode();
     }

     @Override
     public String toString() {
         return "RequestModel{" +
                 "policyInfo=" + policyInfo +
                 ", custInfo=" + custInfo +
                 ", productInfo=" + productInfo +
                 ", inform=" + inform +
                 ", docList=" + docList +
                 ", midResult=" + midResult +
                 '}';
     }
 }
